<html>
<head>
  <style>
	body
	{
		line-height: 1.6em;
	}
	
	#hor-minimalist-a
	{
		font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
		font-size: 12px;
		background: #fff;
		border-collapse: collapse;
		text-align: left;
	}
	#hor-minimalist-a th
	{
		padding-top: 15px;
		font-size: 14px;
		font-weight: normal;
		color: #039;
		border-bottom: 2px solid #6678b1;
	}
	#hor-minimalist-a td
	{
		color: #669;
		padding: 9px 8px 0px 8px;
	}
	#hor-minimalist-a tbody tr:hover td
	{
		color: #009;
	}
	.header
	{
		font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
		font-size: 16px;
		background: #fff;
		color: #039;
	    text-align: center;
	    font-weight: bold;
	}

  
  </style>
</head>
<body>

<cfcontent type="application/pdf"><cfheader name="Content-Disposition" value="inline; filename=roster.pdf"><cfdocument format="pdf" bookmark="true" htmlbookmark="true">
<cfdocumentitem type = "header">
	<p class="header" style='
		padding-bottom: 10px;
		font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
		font-size: 16px;
		background: #fff;
	    text-align: center;
	    font-weight: bold;
		border-bottom: 2px solid #000000;
		'>Spiritual Assembly of the Baha'is of <cfoutput>#roster.community#</cfoutput><br/>Community Roster</p>
</cfdocumentitem>
<cfdocumentitem type = "footer">
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr style="border-top: 1px solid #000000;">
			<td style='
				font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
				padding-top: 5px;
				font-size: 10px;
				background: #fff;
			    text-align: left;
			    font-weight: bold;	
			    border-top: 1px solid #000000;		
			'><cfoutput>Date: #dateFormat(now(),"mmmm dd, yyyy")#</cfoutput></td>
			<td style='
				font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
				padding-top: 5px;
				font-size: 10px;
				background: #fff;
			    text-align: right;
			    font-weight: bold;	
			    border-top: 1px solid #000000;		
			'><cfoutput>Page: #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput></td>
		</tr>
	</table>
</cfdocumentitem>

<table width="100%" cellspacing="0" cellpadding="0">

<cfloop query="hoh">
	<cfset family = model("member").findAll(where="rosterid=#roster.id# AND householdid=#hoh.householdid#",orderby="HeadofHousehold desc, AgeGroup")>
	<tr>
		<td>
			<table width="100%" cellspacing="0" cellpadding="0">

				<tr style='border-bottom: 1px solid #000000;'>
					<td width="20%" align="left" nowrap="yes" style='
						font-family: Sans-Serif;
						padding-top: 15px;
						font-size: 14px;
						font-weight: bold;
						border-bottom: 1px solid #000000;
						'><cfoutput>#hoh.LastName#&nbsp;</cfoutput>
					</td>
					<td width="20%" align="center" nowrap="yes" style='
						font-family: Sans-Serif;
						padding-top: 15px;
						font-size: 12px;
						font-weight: bold;
						border-bottom: 1px solid #000000;
						'><cfoutput><cfif hoh.sector neq "">Sector: #hoh.sector#</cfif>&nbsp;</cfoutput>
					</td>
					<td width="40%" align="center" nowrap="yes" style='
						font-family: Sans-Serif;
						padding-top: 15px;
						font-size: 12px;
						font-weight: bold;
						border-bottom: 1px solid #000000;
						'><cfoutput>#hoh.AddressLine1#&nbsp;</cfoutput>
					</td>
					<td width="20%" align="right" nowrap="yes" style='
						font-family: Sans-Serif;
						padding-top: 15px;
						font-size: 12px;
						font-weight: bold;
						border-bottom: 1px solid #000000;
						'><cfoutput>&nbsp;#trim(hoh.PhoneHome)#</cfoutput>
					</td>
				</tr>
				
				<cfloop query="family">
					<tr>
						<td width="30%" colspan="2" style='
							font-family: Sans-Serif;
							padding-top: 1px;
							font-size: 12px;
							font-weight: normal;
							'><cfoutput>#family.FullName#</cfoutput></td>
						<td width="35%" align="center" style='
							font-family: Sans-Serif;
							padding-top: 1px;
							font-size: 12px;
							font-weight: normal;
							'><cfoutput>#family.Email#</cfoutput></td>
						<td width="30%" align="right" style='
							font-family: Sans-Serif;
							padding-top: 1px;
							font-size: 12px;
							font-weight: normal;
							'><cfoutput>#family.AgeGroup#</cfoutput></td>
					</tr>
				</cfloop>
			
			</table>
		</td>
	</tr>
</cfloop>
</table>
</cfdocument>
</body>
</html>
